package com.yeren.tarena.practice.ff;

import java.util.Scanner;

public class gussDemo {

	public static void main(String[] args) {
		// 获取用户数据
		System.out.println("请输入数字：");
		Scanner scanner = new Scanner(System.in);
		int num = scanner.nextInt();
		genereteArray(num);

	}

	public static int[] genereteArray(int num) {
		int[] b = new int[num];
		// 给数组赋值
		for (int i = 0; i < b.length; i++) {
			int c = (int) (Math.random() * num);
			b[i] = c;
			System.out.print(b[i] + " ");
		}
		return b;
	}
}
